package com.sinodata.bsm.common.vo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * HealthTransRule entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "HEALTH_TRANS_RULE")
public class HealthTransRule implements java.io.Serializable {

    /**
     * serialVersionUID
     */
    private static final long serialVersionUID = 5293370635272948681L;

    // Fields  
    private Long id;
    private Long parentResId;
    private Long childResId;
    private Integer isTrans;
    private Integer weight;

    // Constructors

    /** default constructor */
    public HealthTransRule() {
    }

    /** minimal constructor */
    public HealthTransRule(Long id) {
        this.id = id;
    }

    /** full constructor */
    public HealthTransRule(Long id, Long parentResId, Long childResId, Integer isTrans, Integer weight) {
        this.id = id;
        this.parentResId = parentResId;
        this.childResId = childResId;
        this.isTrans = isTrans;
        this.weight = weight;
    }

    // Property accessors
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequence")
    @SequenceGenerator(name = "sequence", sequenceName = "HEALTH_TRANS_RULE_SEQ")
    @Column(name = "ID", unique = true, nullable = false, precision = 18, scale = 0)
    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Column(name = "PARENT_RES_ID", precision = 18, scale = 0)
    public Long getParentResId() {
        return this.parentResId;
    }

    public void setParentResId(Long parentResId) {
        this.parentResId = parentResId;
    }

    @Column(name = "CHILD_RES_ID", precision = 18, scale = 0)
    public Long getChildResId() {
        return this.childResId;
    }

    public void setChildResId(Long childResId) {
        this.childResId = childResId;
    }

    @Column(name = "IS_TRANS", precision = 2, scale = 0)
    public Integer getIsTrans() {
        return this.isTrans;
    }

    public void setIsTrans(Integer isTrans) {
        this.isTrans = isTrans;
    }

    @Column(name = "WEIGHT", precision = 5, scale = 0)
    public Integer getWeight() {
        return this.weight;
    }

    public void setWeight(Integer weight) {
        this.weight = weight;
    }

    @Override
    public String toString() {
        return "HealthTransRule [id=" + id + ", parentResId=" + parentResId + ", childResId=" + childResId + ", isTrans=" + isTrans + ", weight=" + weight + "]";
    }

}